<template>
  <div>
    <div :class="{ top: true, top3: nxt >= 143 }">
      <div class="top1">
        <img
          class="img1"
          @click="$router.push('/community')"
          src="https://lanhu.oss-cn-beijing.aliyuncs.com/psgkgf77emyogq1nvqk1gc5o39h2abot8mac31f5d10-9cc9-4d7d-9207-50dc4e64d488"
        />
        <span class="text1">新人大比拼</span>
        <img
          class="img2"
          src="https://lanhu.oss-cn-beijing.aliyuncs.com/ps4fksvb0ygpq2i78kp992kkx4a2kh3co7f78b3b33-5d67-4d7a-832f-4b6fa1d4d4f6"
        />
      </div>
      <div class="top2"></div>
    </div>
    <div class="topz"></div>

    <div :class="{ con: true, con2: nxt >= 143 }">
      <span :class="{ ospan: show == '婚纱' }" @click="show = '婚纱'"
        >婚纱摄影
        <i v-show="show == '婚纱'"></i>
      </span>
      <span :class="{ ospan: show == '喜宴' }" @click="show = '喜宴'"
        >喜宴酒店<i v-show="show == '喜宴'"></i
      ></span>
      <span :class="{ ospan: show == '珠宝' }" @click="show = '珠宝'"
        >珠宝首饰<i v-show="show == '珠宝'"></i
      ></span>
      <span :class="{ ospan: show == '礼服' }" @click="show = '礼服'"
        >婚纱礼服<i v-show="show == '礼服'"></i
      ></span>
      <span :class="{ ospan: show == '四大' }" @click="show = '四大'"
        >四大金刚<i v-show="show == '四大'"></i
      ></span>
    </div>
    <div class="bottom">
      <ul>
        <li v-for="i in 9" :key="i">
          <img
            src="https://lanhu.oss-cn-beijing.aliyuncs.com/ps32lg3ftdtmnzhf0h13b7q0huagmxcgzhh70f8f03b-0da2-485e-ab19-e714268b6003"
            alt=""
          />
          <p>薇拉摄影</p>
        </li>
      </ul>
    </div>

    <div class="diz"></div>
    <div class="di"></div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      show: "婚纱",
      nxt: "",
    };
  },
  methods: {
    brr() {
      window.addEventListener("scroll", () => {
        let scrollTop =
          document.body.scrollTop || document.documentElement.scrollTop;
        this.nxt = scrollTop;
        console.log(this.nxt);
      });
    },
  },
  created() {
    this.brr();
  },
};
</script>
<style scoped>
.top {
  position: fixed;
  top: 0;
  width: 100%;
  height: 4.56rem;
  background: url(https://lanhu.oss-cn-beijing.aliyuncs.com/psry1kdzykudpyzwa55vv4oji2ou0gea6fdad6ce3-0795-46fd-aaf7-77c5b9df8ad4)
    100% no-repeat;
  /* background-color: #f6f6f6; */
  background-size: 100% 100%;
  /* z-index: 3; */
}
.top3 {
  background: #dc4949;
  height: 1.45rem;
  z-index: 3;
}
.top1 {
  position: fixed;
  top: 0;
  width: 100%;
  height: 1.15rem;
  padding-bottom: 0.3rem;
  padding-bottom: 0.29rem;
  color: rgba(0, 0, 0, 1);
  font-size: 0.3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  /* z-index: 3; */
}
.topz {
  width: 100%;
  height: 4.56rem;
}
.img1 {
  margin-left: 0.73rem;
  width: 0.2rem;
  height: 0.32rem;
}
.img2 {
  margin-right: 0.65rem;
  width: 0.46rem;
  height: 0.36rem;
}
.con {
  position: relative;
  width: 100%;
  height: 0.74rem;
  background-color: #f6f6f6;
  border-radius: 0.3rem 0.3rem 0 0;
  color: rgba(153, 153, 153, 1);
  font-size: 0.28rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  align-content: space-around;
  border-bottom: 0.01rem solid #f6f6f6;
  z-index: 5;
}

.con2 {
  position: fixed;
  top: 1.45rem;
}
.con span {
  width: 1.12rem;
  height: 0.26rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.ospan {
  color: rgba(51, 51, 51, 1);
}
.con i {
  margin-top: 0.03rem;
  display: block;
  width: 0.5rem;
  height: 0.03rem;
  background-color: red;
}
.bottom {
  position: relative;
  background-color: rgb(246, 246, 246);
  width: 100%;
  padding-top: 0.25rem;
}
.bottom ul {
  display: flex;
  width: 80%;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: space-between;
}
.bottom li {
  position: relative;
  list-style: none;
  height: 2rem;
  width: 2.8rem;
  margin-bottom: 0.32rem;
}
.bottom li img {
  width: 100%;
  height: 100%;
}
.bottom li p {
  width: 100%;
  height: 0.4rem;
  position: absolute;
  bottom: 0;
  background: rgba(255, 255, 255, 0.5);
  color: rgba(51, 51, 51, 1);
  font-size: 0.22rem;
}
.di {
  width: 100%;
  height: 0.8rem;
  position: fixed;
  bottom: 0;
  background-color: #fff;
}
.diz {
  width: 100%;
  height: 0.8rem;
}
</style>
